package com.chj;

import com.chj.config.DubboConfiguration;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.io.IOException;

/**
 * provider注解启动方式
 */
public class ProviderAppAnnotation {
    public static void main(String[] args) throws IOException {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(
                DubboConfiguration.class);
        context.start();
        System.out.println("-----dubbo开启-----");
        System.in.read(); // 为保证服务一直开着，利用输入流的阻塞来模拟
    }
}
